import { RECEIVE_LISTS} from './mutation-types'
import {Lists} from '../api'

export default {
    async getLists({ commit },callback) {
        const result = await Lists()
        if (result.code === 0) {
            const lists = result.list
            commit(RECEIVE_LISTS, { lists })

            callback &&callback()
        }
    }
}